# Maintainer: Leonardo Arena <rnalrd@alpinelinux.org>
pkgname=libvisio2svg
pkgver=0.5.5
pkgrel=3
pkgdesc="Library/Utilities to convert Microsoft (MS) Visio Documents and Stencils (VSS and VSD) to SVG"
url="https://github.com/kakwa/libvisio2svg"
arch="all"
license="GPL-2.0-only"
makedepends="cmake libxml2-dev freetype-dev libwmf-dev librevenge-dev libvisio-dev
	libemf2svg argp-standalone"
subpackages="$pkgname-dev $pkgname-utils"
source="$pkgname-$pkgver.tar.gz::https://github.com/kakwa/libvisio2svg/archive/$pkgver.tar.gz"
builddir="$srcdir"/$pkgname-$pkgver

build() {
	cd "$builddir"
	cmake . -DCMAKE_INSTALL_PREFIX=/usr/ -DEXTERNAL_ARGP=argp
	make
}

check() {
	# FIXME
	cd "$builddir"
	./vsd2svg-conv -V
	./vss2svg-conv -V
}

package() {
	cd "$builddir"
	make DESTDIR="$pkgdir" install
}

utils() {
	mkdir -p "$subpkgdir"/usr/bin
	mv "$pkgdir"/usr/bin/* "$subpkgdir"/usr/bin
}

sha512sums="42b0a66f839885aa46022a6fb9dda40143586a14a0a880eb8af71a749de312f8b6ed00f1c4e2f9e438814dcabb638672a2f2b2d5c85be015ce6ee4dc59ae8765  libvisio2svg-0.5.5.tar.gz"
